package acceptTests;

import sessionManager.SessionManager;
import user.UserIF;
import user.profile.ProfileFacade;

public class US01Facade {
	private SessionManager session = SessionManager.getInstance();

	// equivalente a criar um usuario
	public void createProfile(String login, String senha, String nome_exibicao,
			String email, String sexo, String dataNasc, String endereco,
			String interesses, String quem_sou_eu, String filmes,
			String musicas, String livros) throws Exception {

		session.createUser(login, senha, nome_exibicao, email, sexo, dataNasc,
				endereco, interesses, quem_sou_eu, filmes, musicas, livros);

	}

	public void cleanPersistence(){
		session.cleanPersistence();
	
	}

	public String getProfileInformation(String login, String atributo)
			throws Exception {
		
		UserIF u = session.getUserByLogin(login);
		ProfileFacade pf = new ProfileFacade(u.getProfile());
		return pf.getProfileInformation(atributo);
	}

	public void saveData() throws Exception {
		session.saveData();
	}
}
